# Maintainer: Christian Hesse <eworm@archlinux.org>

pkgname=libprocps
pkgver=3.3.17
pkgrel=3
pkgdesc='procps 3.x libraries for monitoring your system and its processes'
url='https://gitlab.com/procps-ng/procps'
license=('GPL' 'LGPL')
arch=('loong64' 'x86_64')
depends=('glibc' 'systemd-libs')
provides=('libprocps.so')
options=('!emptydirs')
validpgpkeys=('5D2FB320B825D93904D205193938F96BDF50FEA5') # Craig Small <csmall@debian.org>
source=("https://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${pkgver}.tar.xz"{,.asc})
sha256sums=('4518b3e7aafd34ec07d0063d250fd474999b20b200218c3ae56f5d2113f141b4'
            'SKIP')
b2sums=('43aa1a21d4f0725b1c02457f343cf1fc66bc1771b25c6eaf689c9775c190e90545bfac1729f027abc4d3d13de37ffac4828554b5b25e12bcf6af9540de1695f3'
        'SKIP')

build() {
  cd procps-${pkgver}

  ./configure \
    --prefix=/usr \
    --exec-prefix=/ \
    --sysconfdir=/etc \
    --libdir=/usr/lib \
    --bindir=/usr/bin \
    --sbindir=/usr/bin \
    --enable-watch8bit \
    --with-systemd \
    --disable-modern-top \
    --disable-kill
  make
}

package() {
  cd procps-${pkgver}

  make DESTDIR="${pkgdir}" install

  rm -rf "${pkgdir}"/usr/{bin,share}
}
